import React, {CSSProperties} from 'react';
import {render} from 'react-dom';
import HtmlIndex from './index';

export interface IOption {
  text: string;
  style: CSSProperties
}

export default class Text extends HtmlIndex {

  renderItem({text, style}: IOption) {
    return <div
      style={style}
      title={text}
    >{text}</div>
  }

}

/**
 * 配置模板
 */
const configTemp = {
  option: {
    text: '文本',
    style: {
      textOverflow: 'ellipsis', // ellipsis  clip revert unset
      overflow: 'hidden', // hidden auto
      whiteSpace: 'nowrap',
      wordWrap: 'normal',
      fontSize: 12,
      color: '#ccc',
      lineHeight: '12px',
      textAlign: 'left',
      fontWeight: 400
    }
  }
}
export {configTemp};
